package com.mlz.mlzmall.ui.activity.act.personal.userLogin;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

import com.mlz.mlzmall.R;
import com.mlz.mlzmall.ui.activity.act.base.TopTitleView;
import com.mlz.mlzmall.ui.activity.act.personal.NetworkRequest.VolleyBaseActivity;

/**
 * @description 重置成功
 * Created by 安帅 on 2016/5/24 20:23.
 */
public class SuccessedChangePassword extends VolleyBaseActivity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.successed_change_password);
        assignViews();
        setViewContent();
        setViewClickLinstener();
    }

    private TopTitleView successedTopTitle;
    private TextView tvWordSuccess;
    private Button btnGoLogin;

    private void assignViews() {
        successedTopTitle = (TopTitleView) findViewById(R.id.successed_top_title);
        tvWordSuccess = (TextView) findViewById(R.id.tv_word_success);
        btnGoLogin = (Button) findViewById(R.id.btn_go_login);
    }

    private void setViewContent() {
        successedTopTitle.setLeftButtonContent(null, R.mipmap.pic_2_1_btn_back, null);
        successedTopTitle.setTitleButtonContent("", null, null);
    }

    private void setViewClickLinstener() {
        btnGoLogin.setOnClickListener(this);
        successedTopTitle.setOnLeftButtonClickListener(new TopTitleView.OnLeftButtonClickListener() {
            @Override
            public void onLeftBtnClick(View button) {
                finish();
            }
        });
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_go_login:
                Intent intent = new Intent(SuccessedChangePassword.this, LoginActivity.class);
                enterActivityWithFinish(intent);
                break;
        }
    }
}
